<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<!DOCTYPE html>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <c:if test="${msg!=null}">
        <script type="text/javascript">
            var msg = "${msg}"
            alert(msg);
        </script>
    </c:if>
    <script type="text/javascript" src="script/user.js"></script>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312"/>
    <link rel="stylesheet" type="text/css" href="css/global.css"/>
    <link rel="stylesheet" id="dashicons-css" href="testJs/dashicons.min.css" type="text/css" media="all">
    <link rel='stylesheet' id='admin-bar-css' href='testJs/admin-bar.min.css' type='text/css' media='all'/>
    <link rel="stylesheet" type="text/css" media="all" href="testJs/style.css">
    <link rel="stylesheet" type="text/css" media="all" href="testJs/mo.css">
    <script type="text/javascript" src="script/jquery-1.8.3.min.js"></script>
    <title>微博 - ${user.nickName}的微博</title>

</head>
<body class="bg">
<!-- header开始-->
<%@include file="header.jsp" %>
<!-- header结束-->
<!-- container 开始-->
<div id="header" class="pt15">
    <div class="wrapper">
        <div class="nav fl">
            <a href="javascript:;" class="nav-m"><i class="mo-menu"></i></a>
            <div class="logo fl">
                <h1><a href="http://localhost/wordpress" title="微博"><img src="images/logo.png"></a>
                </h1>
            </div>
            <ul class="menu fr">
                <div class="menu">
                    <ul>
                        <li class=""><a href="home"> 首页</a></li>
                    </ul>
                </div>
            </ul>
        </div>
        <div class="tool fr">
            <a href="publish"><i class="mo-pencil"></i>发布</a>
            <a class="sogin" href="login2"><i class="mo-user"></i>登录</a>
            <a class="sch" href="javascript:;"><i class="mo-search"></i>搜索</a>
        </div>
    </div>
</div>
<div id="banner" style="display: block;">
    <div class="wrapper clearfix">
        <ul>
            <li style="float: left" width="24%">
                <img src="${user.images}" width="120" height="120" class="userphoto"/>
            </li>

            <li style="float: left">
                <br/>

                <p>
                    昵称：${user.nickName}<br/>
                    <br/>
                    <a href="#">邮箱：${user.email}<br/>
                        <br/>
                    </a>积分：${user.integral}<br/>
                    签名：<c:if test="${user.sign==null}">无</c:if>
                    ${user.sign}<br/>
                    <a href="toAttentionOrUnsubscribe?operation=attention&bUserId=${user.id}">+添加关注</a>
                </p></li>
        </ul>
    </div>
</div>

<!-- weibotwo 开始-->
<div id="content">
    <div class="wrapper">
        <div class="main fl">
            <div class="list w750 mt35">
                <h3 class="h3">最新文章</h3>
                <div class="post-list fl mt15">
                    <c:forEach items="${list}" var="weibo">
                        <div class="post-info">
                            <div class="pic fl">
                                <a target="_blank">
                                    <c:if test="${weibo.mImage != 'null'}">

                                        <img src="${weibo.mImage}" id="${weibo.mId}"
                                             onclick="imgAct(${weibo.mId})" height="160px" width="230px"/>
                                    </c:if>
                                    <c:if test="${weibo.mImage == 'null'}">
                                        <img src="${weibo.user.images}" height="160px" width="230px"/>
                                    </c:if>
                                </a>
                            </div>
                            <div class="post-content w490 fr">
                                <div class="post-tit">

                                </div>
                                <div class="post-artice">
                                    <img src="${weibo.user.images}" width="50"
                                         height="50"/></td>
                                    <span style="width:88%" class="content"><a
                                            href="userIndex?userId=${weibo.user.id}">${weibo.user.nickName}</a><img
                                            src="icon/v.gif"
                                            width="11"
                                            height="10"
                                            align="middle"/><br>
                                </span>
                                        ${weibo.mBody}
                                </div>
                                <div class="post-in">
                                    <span>${weibo.publishTime}&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;</span>
                                    <span id="like${weibo.mId}" onclick="like(${weibo.mId})" style="cursor:pointer">
                                    <c:if test="${weibo.b==false}">赞(${weibo.mLike})</c:if>
                                    <c:if test="${weibo.b==true}">已赞(${weibo.mLike})</c:if>
&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
                                </span>

                                    <span id="trans${weibo.mId}" onclick="trans(${weibo.mId})"
                                          style="cursor:pointer">转发(${weibo.mTranum})
                                    &nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
                                </span>

                                    <span id="coll${weibo.mId}" onclick="coll(${weibo.mId})"
                                          style="cursor:pointer">收藏</span>
                                    <a class="fr" href="getComm?weiboId=${weibo.mId}&p=1&fy=0"
                                       target="_blank">more+</a>

                                </div>

                            </div>
                        </div>
                    </c:forEach>
                </div>
            </div>
            <span style="float: right" id="userinfo">
            <ul>
                <li align="right">
                    <c:if test="${pageNum!=1}">
                        <a href="home?pageNum=${pageNum-1}" style="text-decoration:none">上一页</a>&nbsp; &nbsp;
                    </c:if>
                    第&nbsp; ${pageNum} &nbsp;页 &nbsp;&nbsp;
                    <c:if test="${pageNum <pageTotal+1}">
                        <a href="home?pageNum=${pageNum+1}" style="text-decoration:none">下一页</a>
                    </c:if>
                    &nbsp;&nbsp;&nbsp;&nbsp;
                    共 &nbsp; ${pageTotal} &nbsp;页
                </li>
            </ul>

    </span>
        </div>
        <div class="sidebar w320 fr">
            <div id="localtime"><font>2019-04-26 18:27:30 星期五</font></div>
            <jsp:include page="userinfo.jsp"/>
        </div>


        <jsp:include page="footer.jsp"/>
    </div>
</div>


<script type="text/javascript" src="testJs/online.js "></script>
<!--footer结束-->
</body>
</html>